home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE05 / RESOURCE / BIT2.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-07-21  |  797 b   |  43 lines

  1. unit Bit2;
  2.  
  3. interface
  4.  
  5. {$R Bits.RES}
  6.  
  7. uses
  8.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  9.   Forms, Dialogs, ExtCtrls;
  10.  
  11. type
  12.   TForm1 = class(TForm)
  13.     Image1: TImage;
  14.     procedure FormCreate(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28. procedure TForm1.FormCreate(Sender: TObject);
  29. var
  30.     MyBitmap:TBitmap;
  31. begin
  32.     MyBitmap:=TBitmap.Create;
  33.     MyBitmap.Handle := LoadBitmap(hInstance,'FIRST');
  34.     { Set the image component to the size of the bitmap }
  35.     Image1.Width:=MyBitmap.Width;
  36.     Image1.Height:=MyBitmap.Height;
  37.     { Show the image component copy of the bitmap }
  38.     Image1.Canvas.Draw(0,0,MyBitmap);
  39.     MyBitmap.Destroy;
  40. end;
  41.  
  42. end.
  43.